-
Notifications
You must be signed in to change notification settings - Fork 671
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
X-chain - introducing fees calculators #2700
base: master
Are you sure you want to change the base?
Conversation
4e0e2f8
to
53df271
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it make sense to have a function ?
func CalculateStaticFees(c StaticConfig, tx *txs.Tx) (uint64, error)
Or maybe you have future plans no included in this PR ?
Plan is to introduce dynamic fees as a struct implementing |
}{ | ||
{ | ||
name: "BaseTx pre EUpgrade", | ||
chainTime: preEUpgradeTime, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(No action required) Why is this parameter suggested for inclusion in the test case struct if it never varies?
} | ||
} | ||
|
||
func baseTx() txs.UnsignedTx { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(No action required) Maybe just inline these values given that they aren't used anywhere else?
@@ -0,0 +1,93 @@ | |||
// Copyright (C) 2019-2024, Ava Labs, Inc. All rights reserved. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(No action required) Should this be static_calculator_test.go
?
This PR has become stale because it has been open for 30 days with no activity. Adding the |
Why this should be merged
This PR introduced
fees.Calculator
following closely what we have done in theplatformvm
.How this works
fee.Calculator
interface andstaticCalculator
How this was tested
CI